class AxisValuesController < ApplicationController

  def create
    @axis = Axis.find(params[:axis_id])
    @axis_value = @axis.axis_values.build(params[:axis_value])
    if @axis_value.save
      flash[:notice] = "Value created"
    end
    redirect_to edit_axis_url(@axis)
  end

  def destroy
    @axis = Axis.find(params[:axis_id])
    AxisValue.destroy(params[:id])
    flash[:notice] = "Value deleted"
    redirect_to edit_axis_url(@axis)
  end

end
